package org.yi.fc.entity;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

public class FUser extends Model<FUser>{
	
	private static final long serialVersionUID = -4368208647272740379L;
	
	public static final FUser dao = new FUser();
	
	/**
	 * FIXME 可优化
	 * 根据邮箱和密码获取用户
	 * @param email
	 * @param pw
	 * @return
	 */
	public List<FUser> getUser(String email, String pw){
		//TODO 空校验或者SQL注入校验
		String sql = "select * from f_user where email = ? and passwd = ?";
		List<FUser> list = dao.find(sql, email,pw);
		return list;
	}

}
